package net.huashitong.keyan.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import com.sirdc.modules.utils.StringUtils;
import net.huashitong.keyan.entity.InspectionSummary;
import net.huashitong.keyan.filter.InspectionSummaryFilter;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class InspectionSummaryDao extends StringDao<InspectionSummary> {

    public List<InspectionSummary> query(InspectionSummaryFilter filter){
        GenericQuery query = createQuery("obj");
//        if (StringUtils.isNotBlank(filter.getCategory())) {
//            query.append(" and category like :category").setParam("category", StringUtils.getLikewords(filter.getCategory()));
//        }
        return query.listResult(filter);
    }
}
